Skip to content

cpu-profiles: Alternative implementation#10

Closed
olivereanderson wants to merge 12 commits into
oanderson/cpu-profilesfrom
oanderson/cpu-profiles-alternative-description
Closed

cpu-profiles: Alternative implementation#10
olivereanderson wants to merge 12 commits into
oanderson/cpu-profilesfrom
oanderson/cpu-profiles-alternative-description

Conversation

@olivereanderson

Copy link
Copy Markdown

This demonstrates an alternative way of specifying cpu features (per profile).

We may or may not prefer this alternative to the original approach.

dependabot Bot and others added 12 commits July 1, 2025 02:50
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.33.1 to 1.34.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](crate-ci/typos@v1.33.1...v1.34.0)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
When invoking the script chown shows a warning.

    chown: warning: '.' should be ':': ‘1000.1000’

From `info coreutils 'chown invocation'`.

   Some older scripts may still use ‘.’ in place of the ‘:’ separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU ‘chown’ supports
‘.’ so long as no ambiguity results, although it issues a warning and
support may be removed in future versions.  New scripts should avoid the
use of ‘.’ because it is not portable, and because it has undesirable
results if the entire OWNER‘.’GROUP happens to identify a user whose
name contains ‘.’.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
// function, index, register triple via `crate::x86_64::impl_cpuid_feature_flags!`
const {
Self {
edx_1: FF::<1, 0, { CpuidReg::EDX as u8 }>::from_names(&[

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better or worse: The compiler does not manage to infer the const generic parameters when they are left out here, even though we have specified them in the field declaration of the struct.

Comment on lines +19 to +21
// Placing this in a const block ensures compile time evaluation and we get isntant feedback
// (even from the LSP) if the lists contain arguments that are not defined for the given
// function, index, register triple via `crate::x86_64::impl_cpuid_feature_flags!`

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified this statement by chance when developing 😄

@phip1611 phip1611 changed the title Alternative implementation cpu-profiles: Alternative implementation Aug 12, 2025
@phip1611 phip1611 deleted the oanderson/cpu-profiles-alternative-description branch November 28, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants